#ifndef WIDGETNODETRANSFORM_H
#define WIDGETNODETRANSFORM_H

#include <QWidget>
#include "../entity/EntitySceneNode.h"

namespace Ui {
class WidgetNodeTransform;
}

class WidgetNodeTransform : public QWidget
{
    Q_OBJECT

public:
    explicit WidgetNodeTransform(QWidget *parent = nullptr);
    ~WidgetNodeTransform();

public slots:
    void setupNode(const QString& name);

protected:
    void hideEvent(QHideEvent *event) override;

private slots:
    void lineEdit_returnPressed();

    void lineEdit_focusChanged(QWidget* old, QWidget* now);

    void on_pushButtonReset_clicked();

    void on_pushButtonApply_clicked();

    void on_pushButtonResetPos_clicked();

    void on_pushButtonResetRot_clicked();

    void on_pushButtonResetScale_clicked();

private:
    static int handleTransform(int, const char** transform, void* form);

private:
    Ui::WidgetNodeTransform *ui;
    std::shared_ptr<EntitySceneNode> _currentNode;
};

#endif // WIDGETNODETRANSFORM_H
